package com.bml.architect.gateway.filters;

import org.springframework.cloud.gateway.filter.GatewayFilter;
import org.springframework.cloud.gateway.filter.factory.AbstractNameValueGatewayFilterFactory;
import org.springframework.stereotype.Component;

/**
 * @author: baiml
 * @Title: LoginGatewayFilterFactory
 * @ProjectName: 中台技术平台
 * @Depart 中台研发部
 * @Description:
 * @date: 2021/5/18 11:35
 */
@Component
public class LoginGatewayFilterFactory extends AbstractNameValueGatewayFilterFactory {
    @Override
    public GatewayFilter apply(NameValueConfig config) {

        return ((exchange, chain) -> {
            System.out.println("config.name="+config.getName());
            System.out.println("config.value="+config.getValue());
            return chain.filter(exchange);
        });
    }
}
